def register_filter(app):
    @app.template_filter('strftime')
    def datetime_strftime(time):
        if time is None:
            return '不能为空'

        return time
